package queue

import (
	"context"
	"time"
	"user/internal/svc"

	"github.com/zeromicro/go-queue/kq"
	"github.com/zeromicro/go-zero/core/service"
)

func Consumers(kqConf kq.KqConf, ctx context.Context, svcCtx *svc.ServiceContext) []service.Service {
	return []service.Service{
		kq.MustNewQueue(kqConf, NewLogConsumer(ctx, svcCtx), kq.WithCommitInterval(time.Second)),
	}
}
